#pragma once

#include <chrono>
#include <iostream>
#include <iterator>
#include <log.h>
#include <memory>
#include <optional>
#include <string>
#include <sw/redis++/errors.h>
#include <sw/redis++/redis.h>
#include <unordered_set>
#include <vector>


namespace lyt {

    class redis_build {
    public:
        static std::shared_ptr<sw::redis::Redis> build(const std::string &host, int port, int db_id, bool keey_alive = true) {
            sw::redis::ConnectionOptions opts;
            opts.host = host;
            opts.port = port;
            opts.db = db_id;
            opts.keep_alive = keey_alive;
            return std::make_shared<sw::redis::Redis>(opts);
        }
    };
} // namespace lyt